Skip to content

Mocking @contentstack/cli-utilities to avoid ESM uuid issues and upgrade cli dependencies#159

Merged
SakshiKoli-CS merged 14 commits into
mainfrom
staging
May 15, 2026
Merged

Mocking @contentstack/cli-utilities to avoid ESM uuid issues and upgrade cli dependencies#159
SakshiKoli-CS merged 14 commits into
mainfrom
staging

Conversation

@SakshiKoli-CS
Copy link
Copy Markdown
Contributor

test: mock @contentstack/cli-utilities so ESM uuid does not break the test suite
chore: upgrade @contentstack/cli-command and cli-utilities version and remove axios override

AryanBansal-launch and others added 14 commits May 4, 2026 13:21
… deployments with GraphQL integration

Co-authored-by: Venkatesh <venkatesh.gopinath@contentstack.com>
Co-authored-by: anujachordiya-contentstack <anuja.chordiya@gmail.com>
…r handling, and update method names for clarity
chore: upgrade @contentstack/cli-command and cli-utilities version and remove axios override
…nce error handling, and update method names for clarity"

This reverts commit 3b9750a.
…ironment resolution logic"

This reverts commit 189764d.
…ling and improved error handling"

This reverts commit 9980454.
…previous deployments with GraphQL integration"

This reverts commit ada3a18.
chore: upgrade @contentstack/cli-command and cli-utilities version and remove axios override
test: mock @contentstack/cli-utilities so ESM uuid does not break the test suite
Mocking @contentstack/cli-utilities so ESM uuid does not break the test suite
@SakshiKoli-CS SakshiKoli-CS requested review from a team as code owners May 15, 2026 08:31
@github-actions
Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to unblock the Jest test suite from ESM-related issues (notably via @contentstack/cli-utilities/uuid) by introducing explicit mocks for @contentstack/cli-utilities, while also upgrading CLI dependency versions and adjusting lint/build config.

Changes:

  • Added a centralized Jest mock module for @contentstack/cli-utilities and updated multiple Jest tests to use it.
  • Updated build/lint configuration (TypeScript exclude for src/test/**, ESLint override for test file line length).
  • Upgraded @contentstack/cli-command / @contentstack/cli-utilities and removed the axios override (lockfile updated accordingly).

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tsconfig.json Excludes src/test/** from the TS project (build inputs).
eslint.config.mjs Disables max-len for src/**/*.test.ts files.
src/test/mocks/cli-utilities.ts Adds a shared Jest mock implementation for @contentstack/cli-utilities.
src/util/logs-polling-utilities.test.ts Switches to the shared cli-utilities mock for Jest.
src/commands/launch/index.test.ts Switches to the shared cli-utilities mock and refactors instantiation.
src/commands/launch/functions.test.ts Adds cli-utilities mocking via the shared mock module.
src/adapters/github.test.ts Replaces inline cli-utilities mocking with the shared mock module.
src/adapters/file-upload.test.ts Replaces inline cli-utilities mocking with the shared mock module.
src/adapters/base-class.test.ts Replaces inline cli-utilities mocking with the shared mock module.
package.json Bumps version + upgrades CLI deps + removes axios override.
package-lock.json Updates lockfile to reflect dependency upgrades/removals.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/commands/launch/index.test.ts
Comment thread src/util/logs-polling-utilities.test.ts
Comment thread src/commands/launch/functions.test.ts
Comment thread src/adapters/github.test.ts
Comment thread src/adapters/file-upload.test.ts
Comment thread src/adapters/base-class.test.ts
@SakshiKoli-CS SakshiKoli-CS merged commit b7f6b0b into main May 15, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants